<template>
  <div class="reject" @click = "rejectShow = !rejectShow" :class="{'on': rejectShow}" >
    <div class="reject-title">驳回原因<i class="ion-arrow-down-b"></i></div>
    <div class="reject-content">{{content}}</div>
  </div>
</template>

<script>
export default {
  data () {
    return {
      rejectShow: false,
      content: ''
    }
  },
  props: ['carId'],
  created () {
    window.axios.get(baseUrl + '/controller/carLog/getCarLogList', {params: {carId: this.carId}}).then(res => {
      res && (this.content = res.data.result[res.data.result.length - 1].carLogInfo)
    })


    //  window.axios.get(baseUrl + '/controller/carLog/getCarLogList', {params: {carId: this.$route.params.id}}).then(res => {
    //       res && (this.content = res.data.result[res.data.result.length - 1].carLogInfo)
    //   })
  }
}
</script>

<style scoped>
  .reject{ position: fixed; top: calc(100% - 40px);  left: 0; z-index: 999; background: rgba(255,104,22,0.9); color: #fff; width: 100%;}
  .reject.on{ bottom: 0; top: auto;}
  .reject-title{ text-align: center; border-bottom: 1px solid #fff; height: 40px; line-height: 40px; font-size: 14px}
  .reject-content{box-sizing: border-box; font-size: 14px; padding: 15px; background: #fff;color: #333;}
</style>

